<!-- 首页-品牌 -->
<template>
	<view class="popular_brand">
		<slot></slot>
		<view class="brand_imgs">
			<img @click="toCheck(item.id)" v-for="(item, index) in brandList.slice(0,9)" :alt="item.title" :src="item.logo" :key="index"/>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		props:{
			brandList:{
				type: Array,
				default: []
			}
		},
		methods: {
			toCheck(id){
				uni.navigateTo({
					url: '/pages/car/caseDetail?id='+id+'&isNew='+true
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.popular_brand{
	display: flex;
	flex-direction: column;
	margin-bottom: 42rpx;
}
.brand_imgs{
	// max-height: 80%;
	width: 100%;
	display: grid;
	justify-content: space-between;
	flex-wrap: wrap;
	grid-template-columns: 1fr 1fr 1fr;
	grid-gap: 12rpx;
	img{
		width: 100%;
		aspect-ratio: 11/8;
		height: 166rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
	}
}
</style>
